<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>Control Panel</title>
        <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
        <!--[if lt IE 9]>
          <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        <link rel="stylesheet/less" href="/files/less/bootstrap.less" media="all" />
        <script src="/files/js/less.min.js"></script>
        <link rel="stylesheet" type="text/css" media="screen" href="/files/css/cpanel.css" />
        
        <script src="/files/js/jquery.min.js"></script>
        <script src="/files/js/prettify.js"></script>
        <script src="/files/js/bootstrap-alerts.js"></script>
        <script src="/files/js/bootstrap-buttons.js"></script>
        <script src="/files/js/bootstrap-dropdown.js"></script>
        <script src="/files/js/bootstrap-modal.js"></script>
        <script src="/files/js/bootstrap-popover.js"></script>
        <script src="/files/js/bootstrap-scrollspy.js"></script>
        <script src="/files/js/bootstrap-tabs.js"></script>
        <script src="/files/js/bootstrap-twipsy.js"></script>
    </head>
    <body>
        <div class="topbar">
            <div class="fill">
                <div class="container">
                    <ul class="nav">
                        <?php foreach($menu as $item): ?>
                        <li><a href="<?php echo Route::url('cpanel', array('controller' => $item[1])); ?>"><?php echo $item[0]; ?></a></li>
                        <?php endforeach; ?>
                    </ul>
                    <div class="pull-right">
                        <ul class="nav">
                            <li><a href="/" target="_blank">Site</a></li>
                            <li><a href="/cpanel/auth/logout/">Logout</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>

        <div class="container">
            <div class="content">

                <div class="page-header">
                    <h1>Control Panel <small><?php echo $title; ?></small></h1>
                </div>
                <?php foreach ($messages as $msg): ?>
                    <div class="alert-message <?php echo $msg[0]; ?> fade in" data-alert="alert">
                        <a class="close" href="#">×</a>
                        <p><?php echo $msg[1]; ?></p>
                    </div>
                <?php endforeach; ?>
                <?php echo $content; ?>

            </div>            
        </div>

        <footer class="footer">
            <div class="container">
                <p class="pull-right"><a href="#">Back to top</a></p>
                <p>
                    <a href="http://kohanaframework.org/" target="_blank">Kohana</a> Control Panel by Alehandr<br />
                    Used <a href="http://twitter.github.com/bootstrap/" target="_blank">Twitter Bootstrap</a>
                </p>
            </div>
        </footer>
    </body>
</html>